1. Field of the Invention
The present invention relates to an image generator, and in particular to a computer image generator suitable for generating information in real time from which an image can be derived for display in for example a flight simulator.
2. Related Art
Real time image generators for flight simulators are used to simulate images which are presented to pilots who are positioned in a mock aircraft cockpit. The intended viewer of the image produced by the system, that is the simulator "pilot", looks out through an imaginary window into a three-dimensional (3-D) world defined by information stored as geometrical and other characteristic attribute data in a main database. A line drawn from the eyepoint through the window intersects a point in the 3-D world. The colour and intensity of that point must be "painted" on the window at the point of intersection of that line with the window.
The displayed image is made up from a series of picture elements (pixels) each of which is of uniform colour and intensity, the colour and intensity of each pixel being a function of the position of the eyepoint relative to the 3-D world which the stored data represents. In a real time display where hundreds of thousands of pixels must be updated sufficiently quickly to avoid jumping of the image, it is necessary to perform many millions of calculations per second to maintain image fidelity.
The position of the eyepoint relative to the database changes over time in response to the manipulation of the flight controls of the simulated aircraft. At any point in time the simulator produces an output indicating the eyepoint position in world space coordinates, that is the coordinate system of the database, and indicating the viewing direction, that is a vector drawn from the pilot's eyepoint through the centre of the viewing window. The database stores data identifying the position and orientation of a large number of features that may contribute to the final image. The image generator calculates which of the features is visible for the given eyepoint, the position of the boundaries of the features relative to the viewing window, and the attributes such as colour and intensity of the visible features. Occultation of one feature by another must be taken into account, and in high quality systems the effects of one translucent feature occulting another must also be taken into account.
The content of the database is used to derive the colour and intensity information for each pixel of the image to be displayed on a screen placed in front of the simulator pilot. The centre of each pixel is on a unique predetermined imaginary viewing line extending from the eyepoint to the screen and notionally extending through the screen onto the surface of the model defined in the database. This means that the world space coordinate system of the database must be transformed using the eyepoint coordinates into a coordinate system having the eyepoint as its origin, that is an eyepoint space coordinate system, and the information must then be transformed from eyepoint space into a screen space coordinate system. The screen space coordinate system is two dimensional, having its origin at the centre of the display screen. These transformations enable the surface areas of the modelled features which determine the colour and intensity of each pixel (for which the screen space coordinates are known) to be determined. Once the features contributing to a particular pixel have been identified, the colour, intensity and other attributes of those features can be obtained from the database and appropriate calculations performed to determine the final displayed colour and intensity of the pixel.
If a high quality image is to be achieved, the final pixel colour and intensity must be based on a number of samples of the contributing features taken at sampling points distributed across each pixel. For each feature making a contribution to an image it is necessary to determine whether or not that feature overlaps each point in screen space corresponding to a sampling point.
In most known CIG systems, the world space model is defined as a series of polygonal features. Light point features can also be displayed in some systems. In the case of polygonal features, each polygon is described in the database by the world space coordinates of at least its vertices, and these geometrical attributes must be transformed into screen space coordinates to take account of the position and orientation of the eyepoint. This involves an initial world space to viewpoint space transformation, followed by a viewpoint space to screen space transformation. The transformations are computationally intensive operations but do enable realistic images to be displayed. In the case of a light point feature, it may be described in the database by for example a position (coordinate of the light point centre) in world space. The position is transformed to screen space, and the feature can then be displayed on a circular area of the screen centred on the transformed position and having a radius which is a function of range, that is distance from the eyepoint.
CIG systems are known which can simulate the visual effects of homogeneous fog, that is fog with a constant density occupying all of the space between the eyepoint and the model. Fog effects may be described in terms of sigma, sometimes referred to as the "extinction coefficient". The transmittance of fog (Tfog) may represented as:
Tfog=e.sup.-sr
where: s is sigma
r is the length of the transmission path through the fog
e is 2.71828
Thus the transmittance Tfog is the luminous flux remaining after light has traversed an optical path of length r and extinction coefficient s. The transmittance of fog could be modelled by an equation other than that set out above, but in all cases it will be necessary to include a term which represents the fog density and a term which represents the length of the transmission path through the fog. The term which represents the fog density will be referred to herein as the extinction coefficient or sigma.
Thus in a CIG system capable of simulating homogeneous fog, the attributes of a feature at a sampling point are modulated by a fog transmittance factor which is a function of the extinction coefficient and the optical path length. The CIG system then sums the fog modulated effects of all sampling points contributing to a pixel using conventional summing techniques. Homogeneous fog simulation does impose an increased computational load on the system, but the increased load is not very large, particularly in systems where feature range is already available, as essentially all that is required is a calculation of Tfog plus a simple modulation of the derived feature attributes by Tfog.
Thus known CIG systems can simulate the effects of homogeneous fog. Unfortunately, in the real world, fog is rarely homogeneous, and the non-homogeneity of fog provides readily apparent and useful visible cues. For example, fog tends to accumulate in horizontal formations in valleys or over low-lying areas, producing strong visual cues. As a further example, fog can be "patchy" so that irregular fog formations can be distributed along the length of a runway. The simulation of the passage of an aircraft through such formations produces very strong visual cues indeed.
It is known to try to simulate the visible effects of non-homogeneous fog by varying the instantaneous homogeneous fog extinction coefficient. For example, the extinction coefficient could be a function of eyepoint altitude, or some other variable. Such an approach has proved to be unsatisfactory however as it results in false cues.
It would be theoretically possible to model non-homogeneous fog as a series of translucent features and to process those features in a conventional manner. Unfortunately it would require a very large number of "fog features" if false cues were to be avoided. For example, passage of a simulated aircraft through one "fog feature" would result in the sudden disappearance of the fog represented by that feature. This would be visually apparent unless a fog formation is made up from a large number of closely adjacent features so that the disappearance of one those features is not visually apparent. In practice, fog cannot be simulated by individual features in real time systems without imposing an unacceptable computational load, Furthermore, detailed modelling of fog formations using a large number of individual translucent fog features would add large costs to model database production.